package com.tind.wyf.baselib.utils.log;

import android.os.Build;
import android.util.Log;

/**
 * 日志处理类
 */
public class LogUtils {

    private static final boolean DEBUG = true;

    public static void v(String tag, String message) {
        try {
            if (DEBUG) {
                Log.v(tag, message);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void d(String tag, String message) {
        try {
            if (DEBUG) {
                Log.d(tag, message);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void i(String tag, String message) {
        try {
            if (DEBUG) {
                Log.i(tag, message);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    public static void w(String tag, String message) {
        try {
            if (DEBUG) {
                Log.w(tag, message);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void e(String tag, String message) {
        try {
            if (DEBUG) {
                Log.e(tag, message);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void e(String tag, String message, Exception e) {
        try {
            if (DEBUG) {
                Log.e(tag, message, e);
            }
        } catch (Exception a) {
            a.printStackTrace();
        }
    }

}
